package ogs.lib.mina.core.filterchain
{
	import ogs.lib.mina.core.service.IoConnector;

	public class TailFilter extends IoFilterAdapter
	{
		private var connector:IoConnector;
		
		public function TailFilter(connector:IoConnector)
		{
			super();
			this.connector = connector;
		}
		
		override public function sessionOpened(nextFilter:NextFilter):void
		{
			connector.getHandler().sessionOpened();
		}

		override public function sessionClosed(nextFilter:NextFilter):void
		{
			connector.getHandler().sessionClosed();
		}
		
		override public function exceptionCaught(nextFilter:NextFilter, cause:Error):void
		{
			connector.getHandler().exceptionCaught(cause);
		}

		override public function messageReceived(nextFilter:NextFilter, message:Object):void
		{
			connector.getHandler().messageReceived(message);
		}

	}
}